package com.lantosec.hmrp.modules.morality.mapper;

import com.lantosec.hmrp.core.kit.PageVO;
import com.lantosec.hmrp.modules.morality.entity.MoralityBranchDept;
import com.lantosec.hmrp.modules.morality.entity.MoralityPlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lantosec.hmrp.modules.morality.entity.MoralityPlanItem;
import com.lantosec.hmrp.modules.morality.entity.MoralityPlanTarget;
import com.lantosec.hmrp.modules.morality.vo.MoralityPlanVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 考评方案 Mapper 接口
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-16
 */
public interface MoralityPlanMapper extends BaseMapper<MoralityPlan> {

    /**
     * 新增考评方案项目
     * @param parm
     */
    void saveMoralityPlanItem(@Param("parm") MoralityPlanItem parm);

    /**
     * 新增考评方案被考评人
     * @param parm
     */
    void saveMoralityPlanTarget(@Param("parm") MoralityPlanTarget parm);

    /**
     * 删除考评方案下的考评项目
     * @param moralityPlanId
     */
    void deleteMoralityPlanItem(@Param("moralityPlanId") Integer moralityPlanId);

    /**
     * 删除考评方案下的被考评对象
     * @param moralityPlanId
     */
    void deleteMoralityPlanTarget(@Param("moralityPlanId") Integer moralityPlanId);

    /**
     * 查询考评方案基本信息
     * @param page
     * @param moralityPlanName
     * @param moralityCycleId
     * @return
     */
    List<MoralityPlanVO> getMoralityPlanList(PageVO<MoralityPlanVO> page, @Param("moralityPlanName") String moralityPlanName, @Param("moralityCycleId") Integer moralityCycleId);

    /**
     * 查询考评方案下的考评基本项目
     * @param moralityPlanId
     * @return
     */
    List<MoralityPlanItem> getMoralityPlanItem(@Param("moralityPlanId") Integer moralityPlanId);

    /**
     * 查询考评方案下的考评加减分项目
     * @param moralityPlanId
     * @return
     */
    List<MoralityPlanItem> getMoralityPlanItem1(@Param("moralityPlanId") Integer moralityPlanId);

    /**
     * 查询考评方案下的被考评人
     * @param moralityPlanId
     * @return
     */
    List<MoralityPlanTarget> getMoralityPlanTarget(@Param("moralityPlanId") Integer moralityPlanId);

    /**
     * 删除考评方案等级
     * @param moralityPlanId
     */
    void deleteMoralityPlanLevel(Integer moralityPlanId);

    /**
     * 新增党支部
     * @param param
     */
    void saveBranchDept(@Param("param") MoralityBranchDept param);

    /**
     * 查询党支部
     * @param page
     * @param branchId
     * @param deptId
     * @return
     */
    List<MoralityBranchDept> getBranchDept(PageVO<MoralityBranchDept> page, @Param("branchId") String branchId, @Param("deptId") String deptId);

    /**
     * 删除党支部
     * @param branchId
     */
    void deleteBranchDept(String branchId);

    /**
     * 查询党支部下的部门名称
     * @param branchIds
     * @return
     */
    List<MoralityBranchDept> getBranchDeptName(String branchIds);

    /**
     * 查询系统中党支部已设定的科室
     * @return
     */
    List<String> getBranchOfDeptId();
}
